1. Field of the Invention
The present invention relates to an amplitude calculation apparatus of an output signal of an encoder and amplitude calculation program of an output signal of an encoder detecting a linear displacement, angle, angular speed, etc. between members.
2. Description of the Related Art
An encoder is used for detecting the angle and radius (Lissajous radius) at sampling points of a Lissajous waveform based on digital signal values A and B obtained by sampling at the same timing the sine wave signals differing in phase by about 90 degrees output from a detector due to mutual movement between members or signals similar to the same, that is, an A-phase signal and B-phase signal, and converting them from an analog to digital format. The Lissajous radius corresponds to the amplitude of the output signal of an encoder.
In the prior art, as described in Japanese Patent Publication (A) No. 2005-308547, the resurge radius R is calculated as R=(A2+B2)1/2.
FIG. 1 is a schematic block diagram showing a conventional amplitude calculation apparatus of an output signal of an encoder. In the figure, 11 indicates an A/D converter converting from an analog to digital format the output of a detector (not shown) detecting the linear displacement, angle, angular speed, etc. of members, that is, an A-phase signal (sine wave), and outputting a digital value A, 12 indicates an A/D converter converting from an analog to digital format a B-phase signal (sine wave) of the same member differing in phase from the A-phase signal by exactly 90° and outputting a digital value A, 13 indicates an angle detection circuit detecting a phase difference θ between the A-phase and B-phase based on the A-value and B-value, and 14 indicates an R calculation circuit calculating the Lissajous radius R.
As shown in the figure, in the past, the radius R of the resurge waveform has been calculated as R=(A2+B2)1/2.
Past calculations include calculation of the squares and calculation of the square roots of the digital values A and B, so if calculated by hardware, the circuit size becomes larger and calculation by software ends up taking time.